/*
menu_get_longest_option();
*/
var _currentopt, _longestopt, _nextopt;
var menu;
if (ds_grid_value_exists(global.menu_index,0,0,4,ds_grid_height(global.menu_index),argument0))
{
menu = ds_grid_get(global.menu_index,3,ds_grid_value_y(global.menu_index,0,0,4,ds_grid_height(global.menu_index),argument0));
_nextopt = ds_map_find_first(menu);
for (o=0; o<ds_map_size(menu); o+=1){
_currentopt = string_width(ds_map_find_value(menu,_nextopt));
if (o=0){
_longestopt = _currentopt;
}
else{
if _currentopt > _longestopt{
_longestopt = _currentopt;
}
}
_nextopt = ds_map_find_next(menu,_nextopt);
}
return (_longestopt);
}
